package com.process;

import java.io.*;

public class Test {
    public static void main(String[] args) throws IOException {
        String filename = "D:\\main.c"; // C语言文件名
        String outputname = "D:\\hello.txt"; // 输出文件名
        String command = "D:\\mingw\\bin\\gcc " + filename + " -o " + outputname; // 编译命令


            ProcessBuilder builder = new ProcessBuilder(command.split(" "));
            builder.redirectErrorStream(true);


        System.out.print(System.currentTimeMillis() + "\n");
            Process process = builder.start();

        System.out.print(System.currentTimeMillis());


    }
}
